package com.loongnoy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.loongnoy.entity.User;
import com.loongnoy.mapper.UserMapper;
import com.loongnoy.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public User login(String username, String password) {
        return userMapper.findByUsernameAndPassword(username, password);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }
}